/**
* @var Language
*/
- var $mLang;
+ public $mLang;
function __construct( $langobj ) { $this->mLang = $langobj; }
function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); }
function convert( $t ) { return $t; }
/**
* @var LanguageConverter
*/
- var $mConverter;
+ public $mConverter;
- var $mVariants, $mCode, $mLoaded = false;
- var $mMagicExtensions = array(), $mMagicHookDone = false;
+ public $mVariants, $mCode, $mLoaded = false;
+ public $mMagicExtensions = array(), $mMagicHookDone = false;
private $mHtmlCode = null;
- var $dateFormatStrings = array();
- var $mExtendedSpecialPageAliases;
+ public $dateFormatStrings = array();
+ public $mExtendedSpecialPageAliases;
protected $namespaceNames, $mNamespaceIds, $namespaceAliases;
/**
* ReplacementArray object caches
*/
- var $transformData = array();
+ public $transformData = array();
/**
* @var LocalisationCache
'zh',
);
- var $mMainLanguageCode;
- var $mVariants, $mVariantFallbacks, $mVariantNames;
- var $mTablesLoaded = false;
- var $mTables;
+ public $mMainLanguageCode;
+ public $mVariants, $mVariantFallbacks, $mVariantNames;
+ public $mTablesLoaded = false;
+ public $mTables;
// 'bidirectional' 'unidirectional' 'disable' for each variant
- var $mManualLevel;
+ public $mManualLevel;
/**
* @var String: memcached key name
*/
- var $mCacheKey;
-
- var $mLangObj;
- var $mFlags;
- var $mDescCodeSep = ':', $mDescVarSep = ';';
- var $mUcfirst = false;
- var $mConvRuleTitle = false;
- var $mURLVariant;
- var $mUserVariant;
- var $mHeaderVariant;
- var $mMaxDepth = 10;
- var $mVarSeparatorPattern;
+ public $mCacheKey;
+
+ public $mLangObj;
+ public $mFlags;
+ public $mDescCodeSep = ':', $mDescVarSep = ';';
+ public $mUcfirst = false;
+ public $mConvRuleTitle = false;
+ public $mURLVariant;
+ public $mUserVariant;
+ public $mHeaderVariant;
+ public $mMaxDepth = 10;
+ public $mVarSeparatorPattern;
const CACHE_VERSION_KEY = 'VERSION 6';
* @author fdcn <fdcn64@gmail.com>, PhiLiP <philip.npc@gmail.com>
*/
class ConverterRule {
- var $mText; // original text in -{text}-
- var $mConverter; // LanguageConverter object
- var $mRuleDisplay = '';
- var $mRuleTitle = false;
- var $mRules = '';// string : the text of the rules
- var $mRulesAction = 'none';
- var $mFlags = array();
- var $mVariantFlags = array();
- var $mConvTable = array();
- var $mBidtable = array();// array of the translation in each variant
- var $mUnidtable = array();// array of the translation in each variant
+ public $mText; // original text in -{text}-
+ public $mConverter; // LanguageConverter object
+ public $mRuleDisplay = '';
+ public $mRuleTitle = false;
+ public $mRules = '';// string : the text of the rules
+ public $mRulesAction = 'none';
+ public $mFlags = array();
+ public $mVariantFlags = array();
+ public $mConvTable = array();
+ public $mBidtable = array();// array of the translation in each variant
+ public $mUnidtable = array();// array of the translation in each variant
/**
* Constructor
class IuConverter extends LanguageConverter {
protected $mDoContentConvert;
- var $mToLatin = array(
+ public $mToLatin = array(
'ᐦ' => 'h', 'ᐃ' => 'i', 'ᐄ' => 'ii', 'ᐅ' => 'u', 'ᐆ' => 'uu', 'ᐊ' => 'a', 'ᐋ' => 'aa',
'ᑉ' => 'p', 'ᐱ' => 'pi', 'ᐲ' => 'pii', 'ᐳ' => 'pu', 'ᐴ' => 'puu', 'ᐸ' => 'pa', 'ᐹ' => 'paa',
'ᑦ' => 't', 'ᑎ' => 'ti', 'ᑏ' => 'tii', 'ᑐ' => 'tu', 'ᑑ' => 'tuu', 'ᑕ' => 'ta', 'ᑖ' => 'taa',
'ᖦ' => 'ɫ', 'ᖠ' => 'ɫi', 'ᖡ' => 'ɫii', 'ᖢ' => 'ɫu', 'ᖣ' => 'ɫuu', 'ᖤ' => 'ɫa', 'ᖥ' => 'ɫaa',
);
- var $mUpperToLowerCaseLatin = array(
+ public $mUpperToLowerCaseLatin = array(
'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e',
'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j',
'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o',
'Z' => 'z',
);
- var $mToSyllabics = array(
+ public $mToSyllabics = array(
'h' => 'ᐦ', 'i' => 'ᐃ', 'ii' => 'ᐄ', 'u' => 'ᐅ', 'uu' => 'ᐆ', 'a' => 'ᐊ', 'aa' => 'ᐋ',
'p' => 'ᑉ', 'pi' => 'ᐱ', 'pii' => 'ᐲ', 'pu' => 'ᐳ', 'puu' => 'ᐴ', 'pa' => 'ᐸ', 'paa' => 'ᐹ',
't' => 'ᑦ', 'ti' => 'ᑎ', 'tii' => 'ᑏ', 'tu' => 'ᑐ', 'tuu' => 'ᑑ', 'ta' => 'ᑕ', 'taa' => 'ᑖ',
* @ingroup Language
*/
class KuConverter extends LanguageConverter {
- var $mArabicToLatin = array(
+ public $mArabicToLatin = array(
'ب' => 'b', 'ج' => 'c', 'چ' => 'ç', 'د' => 'd', 'ف' => 'f', 'گ' => 'g', 'ھ' => 'h',
'ہ' => 'h', 'ه' => 'h', 'ح' => 'h', 'ژ' => 'j', 'ك' => 'k', 'ک' => 'k', 'ل' => 'l',
'م' => 'm', 'ن' => 'n', 'پ' => 'p', 'ق' => 'q', 'ر' => 'r', 'س' => 's', 'ش' => 'ş',
'٩' => '9', # ٩
);
- var $mLatinToArabic = array(
+ public $mLatinToArabic = array(
'b' => 'ب', 'c' => 'ج', 'ç' => 'چ', 'd' => 'د', 'f' => 'ف', 'g' => 'گ',
'h' => 'ه', 'j' => 'ژ', 'k' => 'ک', 'l' => 'ل',
'm' => 'م', 'n' => 'ن', 'p' => 'پ', 'q' => 'ق', 'r' => 'ر', 's' => 'س', 'ş' => 'ش',
protected $mDoContentConvert;
- var $mToLatin = array(
+ public $mToLatin = array(
'ⴰ' => 'a', 'ⴱ' => 'b', 'ⴳ' => 'g', 'ⴷ' => 'd', 'ⴹ' => 'ḍ', 'ⴻ' => 'e',
'ⴼ' => 'f', 'ⴽ' => 'k', 'ⵀ' => 'h', 'ⵃ' => 'ḥ', 'ⵄ' => 'ε', 'ⵅ' => 'x',
'ⵇ' => 'q', 'ⵉ' => 'i', 'ⵊ' => 'j', 'ⵍ' => 'l', 'ⵎ' => 'm', 'ⵏ' => 'n',
'ⵥ' => 'ẓ', 'ⵯ' => 'ʷ', 'ⵖ' => 'ɣ', 'ⵠ' => 'v', 'ⵒ' => 'p',
);
- var $mUpperToLowerCaseLatin = array(
+ public $mUpperToLowerCaseLatin = array(
'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e',
'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j',
'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o',
'Z' => 'z', 'Ɣ' => 'ɣ',
);
- var $mToTifinagh = array(
+ public $mToTifinagh = array(
'a' => 'ⴰ', 'b' => 'ⴱ', 'g' => 'ⴳ', 'd' => 'ⴷ', 'ḍ' => 'ⴹ', 'e' => 'ⴻ',
'f' => 'ⴼ', 'k' => 'ⴽ', 'h' => 'ⵀ', 'ḥ' => 'ⵃ', 'ε' => 'ⵄ', 'x' => 'ⵅ',
'q' => 'ⵇ', 'i' => 'ⵉ', 'j' => 'ⵊ', 'l' => 'ⵍ', 'm' => 'ⵎ', 'n' => 'ⵏ',
* @ingroup Language
*/
class SrConverter extends LanguageConverter {
- var $mToLatin = array(
+ public $mToLatin = array(
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd',
'ђ' => 'đ', 'е' => 'e', 'ж' => 'ž', 'з' => 'z', 'и' => 'i',
'ј' => 'j', 'к' => 'k', 'л' => 'l', 'љ' => 'lj', 'м' => 'm',
'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Č', 'Џ' => 'Dž', 'Ш' => 'Š',
);
- var $mToCyrillics = array(
+ public $mToCyrillics = array(
'a' => 'а', 'b' => 'б', 'c' => 'ц', 'č' => 'ч', 'ć' => 'ћ',
'd' => 'д', 'dž' => 'џ', 'đ' => 'ђ', 'e' => 'е', 'f' => 'ф',
'g' => 'г', 'h' => 'х', 'i' => 'и', 'j' => 'ј', 'k' => 'к',
* @ingroup Language
*/
class UzConverter extends LanguageConverter {
- var $toLatin = array(
+ public $toLatin = array(
'а' => 'a', 'А' => 'A',
'б' => 'b', 'Б' => 'B',
'д' => 'd', 'Д' => 'D',
'ъ' => 'ʼ',
);
- var $toCyrillic = array(
+ public $toCyrillic = array(
'a' => 'а', 'A' => 'А',
'b' => 'б', 'B' => 'Б',
'd' => 'д', 'D' => 'Д',
* Evaluator helper class representing a range list.
*/
class CLDRPluralRuleEvaluator_Range {
- var $parts = array();
+ public $parts = array();
function __construct( $start, $end = false ) {
if ( $end === false ) {
* Helper class for converting rules to reverse polish notation (RPN).
*/
class CLDRPluralRuleConverter {
- var $rule, $pos, $end;
- var $operators = array();
- var $operands = array();
+ public $rule, $pos, $end;
+ public $operators = array();
+ public $operands = array();
/**
* Precedence levels. Note that there's no need to worry about associativity
* The base class for operators and expressions, describing a region of the input string.
*/
class CLDRPluralRuleConverter_Fragment {
- var $parser, $pos, $length, $end;
+ public $parser, $pos, $length, $end;
function __construct( $parser, $pos, $length ) {
$this->parser = $parser;
* validation.
*/
class CLDRPluralRuleConverter_Expression extends CLDRPluralRuleConverter_Fragment {
- var $type, $rpn;
+ public $type, $rpn;
function __construct( $parser, $type, $rpn, $pos, $length ) {
parent::__construct( $parser, $pos, $length );
* messages), and the binary operator at that location.
*/
class CLDRPluralRuleConverter_Operator extends CLDRPluralRuleConverter_Fragment {
- var $name;
+ public $name;
/**
* Each op type has three characters: left operand type, right operand type and result type
/**
* @var DatabaseBase
*/
- var $dbw;
- var $batchSize = 1000;
- var $minTs = false;
+ public $dbw;
+ public $batchSize = 1000;
+ public $minTs = false;
function execute() {
$this->dbw = wfGetDB( DB_MASTER );
*
* @var int
*/
- var $url_limit;
+ public $url_limit;
/**
* The maximum size of a sitemap file
*
* @var int
*/
- var $size_limit;
+ public $size_limit;
/**
* The path to prepend to the filename
*
* @var string
*/
- var $fspath;
+ public $fspath;
/**
* The URL path to prepend to filenames in the index; should resolve to the same directory as $fspath
*
* @var string
*/
- var $urlpath;
+ public $urlpath;
/**
* Whether or not to use compression
*
* @var bool
*/
- var $compress;
+ public $compress;
/**
* Whether or not to include redirection pages
*
* @var bool
*/
- var $skipRedirects;
+ public $skipRedirects;
/**
* The number of entries to save in each sitemap file
*
* @var array
*/
- var $limit = array();
+ public $limit = array();
/**
* Key => value entries of namespaces and their priorities
*
* @var array
*/
- var $priorities = array();
+ public $priorities = array();
/**
* A one-dimensional array of namespaces in the wiki
*
* @var array
*/
- var $namespaces = array();
+ public $namespaces = array();
/**
* When this sitemap batch was generated
*
* @var string
*/
- var $timestamp;
+ public $timestamp;
/**
* A database slave object
*
* @var object
*/
- var $dbr;
+ public $dbr;
/**
* A resource pointing to the sitemap index file
*
* @var resource
*/
- var $findex;
+ public $findex;
/**
*
* @var resource
*/
- var $file;
+ public $file;
/**
* Identifier to use in filenames, default $wgDBname
* @ingroup Maintenance
*/
class BackupReader extends Maintenance {
- var $reportingInterval = 100;
- var $pageCount = 0;
- var $revCount = 0;
- var $dryRun = false;
- var $uploads = false;
- var $imageBasePath = false;
- var $nsFilter = false;
+ public $reportingInterval = 100;
+ public $pageCount = 0;
+ public $revCount = 0;
+ public $dryRun = false;
+ public $uploads = false;
+ public $imageBasePath = false;
+ public $nsFilter = false;
function __construct() {
parent::__construct();
* @ingroup Maintenance
*/
class JSParseHelper extends Maintenance {
- var $errs = 0;
+ public $errs = 0;
public function __construct() {
parent::__construct();
*/
class GenerateCollationData extends Maintenance {
/** The directory with source data files in it */
- var $dataDir;
+ public $dataDir;
/** The primary weights, indexed by codepoint */
- var $weights;
+ public $weights;
/**
* A hashtable keyed by codepoint, where presence indicates that a character
* has a decomposition mapping. This makes it non-preferred for group header
* selection.
*/
- var $mappedChars;
+ public $mappedChars;
- var $debugOutFile;
+ public $debugOutFile;
/**
* Important tertiary weights from UTS #10 section 7.2
}
class UcdXmlReader {
- var $fileName;
- var $callback;
- var $groupAttrs;
- var $xml;
- var $blocks = array();
- var $currentBlock;
+ public $fileName;
+ public $callback;
+ public $groupAttrs;
+ public $xml;
+ public $blocks = array();
+ public $currentBlock;
function __construct( $fileName ) {
$this->fileName = $fileName;
* @ingroup MaintenanceLanguage
*/
class GenerateNormalizerData extends Maintenance {
- var $dataFile;
+ public $dataFile;
public function __construct() {
parent::__construct();
* @ingroup Maintenance
*/
class MinifyScript extends Maintenance {
- var $outDir;
+ public $outDir;
public function __construct() {
parent::__construct();
$wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'PPFuzzTester::templateHook';
class PPFuzzTester {
- var $hairs = array(
+ public $hairs = array(
'[[', ']]', '{{', '{{', '}}', '}}', '{{{', '}}}',
'<', '>', '<nowiki', '<gallery', '</nowiki>', '</gallery>', '<nOwIkI>', '</NoWiKi>',
'<!--' , '-->',
// extensions
// '<ref>', '</ref>', '<references/>',
);
- var $minLength = 0;
- var $maxLength = 20;
- var $maxTemplates = 5;
- // var $outputTypes = array( 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' );
- var $entryPoints = array( 'testSrvus', 'testPst', 'testPreprocess' );
- var $verbose = false;
+ public $minLength = 0;
+ public $maxLength = 20;
+ public $maxTemplates = 5;
+ // public $outputTypes = array( 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' );
+ public $entryPoints = array( 'testSrvus', 'testPst', 'testPreprocess' );
+ public $verbose = false;
static $currentTest = false;
function execute() {
}
class PPFuzzTest {
- var $templates, $mainText, $title, $entryPoint, $output;
+ public $templates, $mainText, $title, $entryPoint, $output;
function __construct( $tester ) {
global $wgMaxSigChars;
}
class PPFuzzUser extends User {
- var $ppfz_test, $mDataLoaded;
+ public $ppfz_test, $mDataLoaded;
function load() {
if ( $this->mDataLoaded ) {
* @ingroup Maintenance
*/
class PurgeParserCache extends Maintenance {
- var $lastProgress;
+ public $lastProgress;
function __construct() {
parent::__construct();
*/
class CheckStorage {
const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"';
- var $oldIdMap, $errors;
- var $dbStore = null;
+ public $oldIdMap, $errors;
+ public $dbStore = null;
- var $errorDescriptions = array(
+ public $errorDescriptions = array(
'restore text' => 'Damaged text, need to be restored from a backup',
'restore revision' => 'Damaged revision row, need to be restored from a backup',
'unfixable' => 'Unexpected errors with no automated fixing method',
require_once( __DIR__ . '/../Maintenance.php' );
class FixBug20757 extends Maintenance {
- var $batchSize = 10000;
- var $mapCache = array();
- var $mapCacheSize = 0;
- var $maxMapCacheSize = 1000000;
+ public $batchSize = 10000;
+ public $mapCache = array();
+ public $mapCacheSize = 0;
+ public $maxMapCacheSize = 1000000;
function __construct() {
parent::__construct();
$job->execute();
class RecompressTracked {
- var $destClusters;
- var $batchSize = 1000;
- var $orphanBatchSize = 1000;
- var $reportingInterval = 10;
- var $numProcs = 1;
- var $useDiff, $pageBlobClass, $orphanBlobClass;
- var $slavePipes, $slaveProcs, $prevSlaveId;
- var $copyOnly = false;
- var $isChild = false;
- var $slaveId = false;
- var $noCount = false;
- var $debugLog, $infoLog, $criticalLog;
- var $store;
+ public $destClusters;
+ public $batchSize = 1000;
+ public $orphanBatchSize = 1000;
+ public $reportingInterval = 10;
+ public $numProcs = 1;
+ public $useDiff, $pageBlobClass, $orphanBlobClass;
+ public $slavePipes, $slaveProcs, $prevSlaveId;
+ public $copyOnly = false;
+ public $isChild = false;
+ public $slaveId = false;
+ public $noCount = false;
+ public $debugLog, $infoLog, $criticalLog;
+ public $store;
static $optionsWithArgs = array( 'procs', 'slave-id', 'debug-log', 'info-log', 'critical-log' );
static $cmdLineOptionMap = array(
* Class to represent a recompression operation for a single CGZ blob
*/
class CgzCopyTransaction {
- var $parent;
- var $blobClass;
- var $cgz;
- var $referrers;
+ public $parent;
+ public $blobClass;
+ public $cgz;
+ public $referrers;
/**
* Create a transaction from a RecompressTracked object
echo "All done.\n";
class TrackBlobs {
- var $clusters, $textClause;
- var $doBlobOrphans;
- var $trackedBlobs = array();
+ public $clusters, $textClause;
+ public $doBlobOrphans;
+ public $trackedBlobs = array();
- var $batchSize = 1000;
- var $reportingInterval = 10;
+ public $batchSize = 1000;
+ public $reportingInterval = 10;
function __construct( $clusters ) {
$this->clusters = $clusters;
const BATCH_SIZE = 50; // Number of rows to process in one batch
const SYNC_INTERVAL = 20; // Wait for slaves after this many batches
- var $sizeHistogram = array();
+ public $sizeHistogram = array();
public function __construct() {
parent::__construct();